import { requestToData, commonRequest } from '@/api/commonHttp';
// 商品准入管理 - 商品新增 - 获取商品列表信息
export const getCommodityListService = (data, loadingFn) => requestToData({
  url: '/sysback/commit/record/getRecordPager',
  type: 'post',
  data,
  loadingFn
});

// 商品准入管理 - 商品新增 - 查看单据 - 获取单据信息
export const getByRecordNoService = (data, loadingFn) => commonRequest({
  url: '/sysback/commit/record/getByRecordNo',
  type: 'post',
  data,
  loadingFn,
  isFormData: true
})

// 商品准入管理 - 商品新增 - 查看单据 - 根据contentType获取单据信息
export const getDetailByRecordNoService = (data, loadingFn) => commonRequest({
  url: '/sysback/commit/record/getDetailByRecordNo',
  type: 'post',
  data,
  loadingFn,
  isFormData: true
})

// 商品准入管理 - 商品新增 - 查看单据 - 获取展示标签
export const showRecordTabService = (data, loadingFn) => commonRequest({
  url: '/sysback/commit/record/showRecordTab',
  type: 'post',
  data,
  loadingFn,
  isFormData: true
})

// 商品准入管理 - 商品新增 - 查看单据 - 获取新售价单据信息
export const searchRecordForAddSpuService = (data, loadingFn) => commonRequest({
  url: '/sysback/salePrice/secondPhase/prepare/searchRecordForAddSpu',
  type: 'get',
  data,
  loadingFn
})

// 商品准入管理 - 商品新增 - 查看单据 - 获取资质类型单据信息
export const getQuaPrepareRecordDetailService = (data, loadingFn) => commonRequest({
  url: '/sysback/commit/record/getQuaPrepareRecordDetail',
  type: 'get',
  data,
  loadingFn,
})

// 商品准入管理 - 商品新增 - 查看单据 - 获取图文信息单据信息
export const getPrepareSpuListByRecordNoService = (data, loadingFn) => commonRequest({
  url: '/sysback/commit/record/getPrepareSpuListByRecordNo',
  type: 'get',
  data,
  loadingFn,
})

// 商品准入管理 - 商品新增 - 查看单据 - 商品信息 - 审核通过
export const reviewPassMainService = (data, loadingFn) => commonRequest({
  url: '/sysback/commit/record/reviewPassMain',
  type: 'post',
  data,
  loadingFn,
})

// 商品准入管理 - 商品新增 - 查看单据 - 商品信息 - 审核驳回
export const reviewFailMainService = (data, loadingFn) => commonRequest({
  url: '/sysback/commit/record/reviewFailMain',
  type: 'post',
  data,
  loadingFn,
})
